package entity.test01.demo03;

import entity.Student;

public class Maintest02 {
    public static void main(String[] args) throws Exception {
        Student stu = new Student();

        // 1.获取 Student 类的 Class 对象
        Class<?> clazz = stu.getClass();

        // 2.获取 class 对象指向类的父类的Class对象 - Object类的Class对象
        Class<?> superclass = clazz.getSuperclass();

        String name = superclass.getName();
        System.out.println(name);
    }
}
